<?php

use Illuminate\Routing\Router;


Route::group([
    'prefix' => 'admin/live',
    'namespace' => 'Frieza\\Modules\\Live\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {
    $router->get('/index', 'IndexController@index');
    $router->get('/index/living', 'IndexController@living');
    $router->get('/index/{id}/edit', 'IndexController@create');
    $router->get('/index/{id}/banner', 'IndexController@banner');
    $router->get('/index/create', 'IndexController@create');
    $router->post('/sort', 'IndexController@sort');
    $router->post('/save', 'IndexController@save');
    $router->post('/saveBanner', 'IndexController@saveBanner');
    $router->post('/index/close', 'IndexController@close');
    $router->post('/close', 'IndexController@close');
    $router->post('/start', 'IndexController@start');
    $router->post('/closelianmai', 'IndexController@closelianmai');
    $router->post('/resumelianmai', 'IndexController@resumelianmai');
    $router->post('/del', 'IndexController@del');
    $router->post('/cancelBack', 'IndexController@cancelBack');
    $router->post('/openBack', 'IndexController@openBack');
    $router->post('/index/{id}/createGroup', 'IndexController@createGroup');
    $router->post('/index/createGroup', 'IndexController@createGroup');

    $router->get('/index/white', 'IndexController@white');
    $router->post('/index/saveWhite', 'IndexController@saveWhite');

    $router->get('index/backList', 'BackController@index');
    $router->put('index/backList/{id}', 'BackController@changeHot');
    $router->post('index/backList/{id}', 'BackController@edit');
    $router->post('index/backList/trans/{id}', 'BackController@trans');
    $router->post('index/backList/transTask/{id}', 'BackController@transTask');
    $router->get('index/question', 'BackController@question');
    $router->get('index/videoPlay/{id}', 'BackController@videoPlay');
    $router->get('transmp4list', 'BackController@transmp4list');
    $router->post('index/backList/resetTrans/{id}', 'BackController@resetTrans');



    $router->get('/index/backList/setContent/{roomid}', 'BackController@setContent');
    $router->post('/index/backList/addContent', 'BackController@addContent');

    $router->post('/index/backList/delContent/{rela_id}', 'BackController@delContent');
    $router->get('/lottery/{room_id}', 'BackController@lotteryList');


    $router->get('/chest/{id}', 'ChestController@index');
    $router->get('/chest/{id}/{chestType}/list', 'ChestController@chestType');
    $router->post('/chest/{id}/saveType', 'ChestController@saveType');
    $router->post('/chest/{id}/{chestType}/saveChest', 'ChestController@saveChest');
    $router->post('/chest/{id}/sort', 'ChestController@sortType');
    $router->post('/chest/{id}/{chestType}/sort', 'ChestController@sortObj');
    $router->delete('/chest/{id}/{chestType}/list/{chestId}', 'ChestController@delChestObj');
    $router->post('/chest/relaArticle/{id}', 'ChestController@relaArticle');
    $router->post('/chest/delrelaArticle/{id}', 'ChestController@delrelaArticle');
    $router->post('/chest/delOtherRoom/{id}', 'ChestController@delOtherRoom');

    $router->get('/column', 'ColumnController@index');
    $router->get('/column/test', 'ColumnController@test');
    $router->get('/column/test/{id}/edit', 'ColumnController@create');

    $router->get('/column/create', 'ColumnController@create');
    $router->get('/column/{id}/edit', 'ColumnController@create');
    $router->post('/column/save', 'ColumnController@save');
    $router->put('/column/{id}', 'ColumnController@editcolumn');
    $router->delete('/column/{id}', 'ColumnController@deletecolumn');
    $router->get('/column/subscribe', 'ColumnController@subscribe');
    $router->get('/column/subscribe/{column_id}', 'ColumnController@subscribe');

    $router->get('/column/addlivetocolumn', 'ColumnController@addLiveToColumn');
    $router->post('/column/saveLiveToColumn', 'ColumnController@saveLiveToColumn');

    $router->get('/contentcard', 'ContentCardController@index');
    $router->get('/contentcard/create', 'ContentCardController@create');
    $router->get('/contentcard/{id}/edit', 'ContentCardController@create');
    $router->post('/contentcard/save', 'ContentCardController@save');
    $router->delete('/contentcard/{id}', 'ContentCardController@deletecard');
    $router->get('/contentcard/settitle', 'ContentCardController@setTitle');
    $router->post('/contentcard/savetitle', 'ContentCardController@saveTitle');

    $router->get('/anchorlevel', 'AnchorLevelController@index');
    $router->put('/anchorlevel/{id}', 'AnchorLevelController@changeLevel');


//    $router->put('index/backList/{id}', 'BackController@changeHot');
//    $router->post('index/backList/{id}', 'BackController@edit');
//    $router->post('index/backList/trans/{id}', 'BackController@trans');
//    $router->post('index/backList/transTask/{id}', 'BackController@transTask');
//    $router->get('index/question', 'BackController@question');
//    $router->get('index/videoPlay/{id}', 'BackController@videoPlay');
});
